<template>
  <div class="login">
    <div class="login-con">
      <Card icon="logo-tux" title="欢迎登陆" :bordered="false">
        <div class="form-con">
          <login-form @on-success-valid="handleSubmit"></login-form>
          <p class="login-tip">输入任意用户名和密码即可</p>
        </div>
      </Card>
    </div>
  </div>
</template>
<script>
import LoginForm from '_c/login-form/login-form'
export default {
  components: {
    LoginForm
  },
  methods: {
    handleSubmit () {
      this.$router.push({
        name: 'home'
      })
    }
  }
}
</script>
<style lang="stylus" scoped>
.login
  width: 100%
  height: 100%
  background-image: url('~@/assets/images/login-bg1.jpg')
  background-size: cover
  background-position: center
  position: relative
  .login-con
    position: absolute
    right: 160px
    top: 50%
    transform: translateY(-60%)
    width: 300px
    .form-con
      padding: 10px 0 0
      .login-tip
        font-size: 10px
        text-align: center
        color: #c3c3c3
</style>
